home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / amospd / 491-500 / apd500 / karl_roberts / freaky-sinus-scroll.amos / freaky-sinus-scroll.amosSourceCode < prev    next >
AMOS Source Code  |  1986-08-03  |  3KB  |  82 lines

  1. '***************************************** 
  2. '* 
  3. '* INNOVATIONS - ICKY
  4. '* 
  5. '* ANOTHER 10 MINUTE ROUTINE 
  6. '* 
  7. '* Four scrolls each slightly more mutated than the other! 
  8. '* 
  9. '* Its quite slow, simply because its AMOS, and its  
  10. '* not a very clever way of doing it.There is a quick method of
  11. '* rotating bit masks, but thats getting too much into assembler!  
  12. '* 
  13. TEX
  14. Procedure TEX
  15.    Screen Open 0,368,200,2,Lowres
  16.    Curs Off : Flash Off : Cls 0
  17.    Screen Display 0,,24,,
  18.    Palette $6
  19.    Colour 1,$FF0
  20. '* no need to double buffer, blame it on the speed of the routine
  21. '* oh shockwave, please note, Wait VBL, is too slow
  22. '* Write your own timing routine 
  23. '* its much damn faster, how do you think I got the realtime bubble
  24. '* starfield to run in 50 frames, with realtime rotation, certainly
  25. '* not with a wait VBL, thats a cert!  
  26. '* 
  27.    Autoback 0
  28.    TEX$=" NOW THIS IS MORE LIKE IT. AFTER A FEW CALCULATIONS ITS FINALLY COMPLETE"
  29.    TEX$=TEX$+". IT COULD BE BETTER BUT THE ROUTINES OKAY. WHY BOTHER "
  30.    TEX$=TEX$+" WHEN ITS ONLY A DEMO............................"
  31.    TEX$=TEX$+" THIS SCROLL IS NOT TRUE SINUS ONLY AN EMULATION"
  32.    TEX$=TEX$+" BUT STILL ITS GET THE MESSAGE ACROSS. I SUPPOSE."
  33.    TEX$=TEX$+" NO GREETS IN THIS ROUTINE....I AM TOO LAZY TO DO THEM......"
  34.    PNR=1 : CNT=1
  35. ' Pixel_jump = step size in copy blocks screen is scanned
  36. ' Ripple = smoothness of effect try 70,71 for best results 
  37. PIXEL_JUMP=20 : RIPPLE=70
  38.  Extension_5_003A 
  39. ' kill multi-tasking 
  40. Dreg(0)=Execall(-132)
  41.    Repeat 
  42.       Inc CNT : If CNT>18 Then Gosub NEWLET
  43.       For H=340 To 0 Step -PIXEL_JUMP
  44. '********************************************************
  45.          Screen Copy 0,H,10,H+10,149 To 0,H-1,59
  46.          Screen Copy 0,H+10,20,H+20,149 To 0,H+9,RIPPLE
  47. '******************************************************* 
  48. ' pixel_jump must equal -40
  49. ' include these lines for a faster, but rougher scroll 
  50. ' dont forget take other screen copies out in this repeat loop 
  51. '         Screen Copy 0,H,10,H+20,149 To 0,H-1,59
  52. '         Screen Copy 0,H+10,20,H+40,149 To 0,H+9,RIPPLE 
  53. '******************************************************* 
  54.       Next H
  55.       Screen Copy 0,0,10,360,80 To 0,-1,10 : Wait 1
  56.    Until Fire(0)
  57. ' reactivate multitasking
  58. Dreg(0)=Execall(-138)
  59. Edit 
  60.    POS=245
  61.    For T=4 To 0 Step -1
  62.       For Y=POS To 310 Step 10
  63.          Screen Display T,,Y,, : Wait Vbl 
  64.       Next Y
  65.       Add POS,-55
  66.       Screen Close T
  67.    Next T
  68.    Rainbow Del 2
  69.    Screen 7 : Fade 3 : Wait 40 : Screen Close 7
  70.    Pop Proc
  71.    NEWLET:
  72.    TX$=Mid$(TEX$,PNR,1)
  73.    T=Asc(TX$)-64
  74.    If TX$=" " Then T=40
  75.    If TX$="." Then T=27
  76.    If TX$="?" Then T=28
  77.    If TX$="," Then T=39
  78.    Paste Icon 340,31,T
  79.    Inc PNR : If PNR>Len(TEX$) Then PNR=1
  80.    CNT=1
  81.    Return 
  82. End Proc